@* The shape tag helper will render a shape in the markup. The type attribute will be the shape type which is mapped
    primarily from cshtml or liquid files (there are other ways of creating shape types but that will be described
    later). The following attributes will be actual parameters in a dynamic view model passed to the shape. *@

<shape type="TestShape" name="John Doe" age="26" />

@* NEXT STATION: Check out Views/TestShape.cshtml and then come back here. *@

@* Note that you can only pass primitive values to the <shape> Tag Helper. Shapes can very well accept complex object
    in their parameters too but for that you'd need to write a bit more complex code:*@

@await DisplayAsync(await New.ComplexTestShape(Values: new[] { "one", "two", "three" }))

@* The New property contains a shape factory that you can use like above to create shapes. Then you can use
    DisplayAsync, which we'll also use a lot later, to display it. *@

@* NEXT STATION: Check out Views/ComplexTestShape.cshtml and then come back here. *@

@* You can also create shapes that use a statically typed model, not a dynamic one. This is slightly more complex though
    and you have to do the following: *@

@* This is necessary to be able to use an extension method on IShapeFactory. *@
@using OrchardCore.DisplayManagement

@* Factory is an IShapeFactory instance. It's behind the New property as well, BTW. *@
@await DisplayAsync(await Factory.CreateAsync<StaticallyTypedTestShapeViewModel>(
    "StaticallyTypedTestShape",
    cacheViewModel =>
    {
        cacheViewModel.SomeValue = 4;
        cacheViewModel.SomeOtherValue = 5;
    }))

@* NEXT STATION: Check out Views/StaticallyTypedTestShape.cshtml and then come back here. *@

@* You can also do a statically typed approach simpler than the previous one if it's OK to derive your view model from
    ShapeViewModel. Check out StaticallyTypedDerivedTestShapeViewModel on what needs to be done in your view model, then
    see how to use it below: *@

@await DisplayAsync(new StaticallyTypedDerivedTestShapeViewModel { SomeValue = 6, SomeOtherValue = 7 })

@* NEXT STATION: Check out Views/StaticallyTypedDerivedTestShape.cshtml and follow up from there. *@
